<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCompanyTable extends Migration
{
    /**
     * Run the migrations.
     * 公司
     * @return void
     */
    public function up()
    {
        Schema::create('company', function (Blueprint $table) {
            $table->increments('id');
	        $table->string('name')->comment('公司名称');
	        $table->string('organization_code')->comment('组织机构代码');
	        $table->string('address')->comment('公司地址');
	        $table->string('linkman')->comment('联系人');
	        $table->string('phone')->comment('联系方式');
	        $table->string('contract_code')->comment('合同编号');
	        $table->date('start_time')->comment('合同开始时间');
	        $table->date('end_time')->comment('合同结束时间');
	        $table->string('salesman')->comment('销售人员');
	        $table->string('license')->comment('营业执照');
	        $table->string('status')->comment('配置状态：1有效，0无效')->default(1);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('company');
    }
}
